Probabilistic Programming
Probabilistic programming is simply programming with probabilities. More concretely, in probabilistic programming we perform random choices and then ask what the probability of a result. For example consider a program:
var x: Bool = flipCoin();
var y: Bool = flipCoin();
Q: What is the probability of x==y? A: 50%.
An essential component of probabilistic programming is how to support these two features for each distribution described by a probabilistic program: A way to take a random sample from the distribution, and a way to estimate the probability density of a certain sample.
Recently, Lew et al published an interesting approach (Probabilistic Programming with Stochastic Probabilities) that contains a neat way to represent and implement a compiler for a probabilistic programming language.
Seminar
In the seminar, we will present and investigate the concept of probabilistic programming languages.
- Provide a brief introduction to the general idea of probabilistic programming using a single popular tool (pick one of Pyro, PyMCMC, ...) and simple example programs with few lines
- Investigate the approach behind the approach by Lew et al.
- Explain how programmers can use the library by Lew et al.
- Explain to the reader how the approach by Lew et al. can be implemented
Project
In a project, we will implementing a simple DSL following the strategy described above in the paper about stochastic probabilities with in Lean. Lean is a modern, general-purpose programming language featuring advanced functional programming constructs such as pattern matching, recursion, immutable datastructures, type classes, dependent types and more. At the same time, Lean compiles to C++, featuring easy interopability with low-level libraries where necessary. Let's try it out and see how far we can go :)